package src.co.edu.uniandes.travelsoft.shared;

public class FieldVerifier {

	public static boolean textoValido(String texto) {
		if (texto == null) {
			return false;
		}
		return texto.length() > 3;
	}
	
	public static boolean textoConfirma(String textoClave, String textoConfirmaClave) {
		if (!textoClave.equalsIgnoreCase(textoConfirmaClave)) {
			return false;
		}
		return true;
	}
	
	public static boolean mail(String email) {
		if(!email.matches("^([a-zA-Z0-9_.\\-+])+@(([a-zA-Z0-9\\-])+\\.)+[a-zA-Z0-9]{2,4}$")) {
		    return false;
		}
		return true;
	}
}
